package com.qpl.depression.service.impl;

import com.qpl.depression.entity.Category;
import com.qpl.depression.repository.CategoryRepository;
import com.qpl.depression.service.CategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author qpl
 * @since 2021-04-22
 */
@Service
public class CategoryServiceImpl extends ServiceImpl<CategoryRepository, Category> implements CategoryService {

    @Autowired
    private CategoryRepository categoryRepository;

    /**
     * 随机获取分类试题
     *
     * @return 分类集合
     */
    @Override
    public List<Category> getByRandom() {
        return categoryRepository.getByRandom();
    }
}
